package com.tyk.bookstore.back.user.model.vo;

import com.tyk.bookstore.back.common.core.model.type.Gender;
import com.tyk.bookstore.back.common.core.util.FileUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
public class UserInfoVo {

    @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String account;

    @Schema(description = "电话", requiredMode = Schema.RequiredMode.REQUIRED)
    private String phone;

    @Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
    private String email;

    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED)
    private Gender gender;

    @Schema(description = "年龄", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer age;

    @Schema(description = "身份证号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String idCard;

    @Schema(description = "头像", requiredMode = Schema.RequiredMode.REQUIRED)
    private String avatar;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private String createTime;

    public UserInfoVo setAvatar(String avatar) {
        this.avatar = FileUtil.fullFilePath(avatar);
        return this;
    }
}
